package com.ruoyi.behindDoctor.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.behindDoctor.mapper.yDocSysUserMapper;
import com.ruoyi.behindDoctor.domain.yDocSysUser;
import com.ruoyi.behindDoctor.service.IyDocSysUserService;

/**
 * 所有医生Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class yDocSysUserServiceImpl implements IyDocSysUserService 
{
    @Autowired
    private yDocSysUserMapper yDocSysUserMapper;

    /**
     * 查询所有医生
     * 
     * @param userId 所有医生主键
     * @return 所有医生
     */
    @Override
    public yDocSysUser selectyDocSysUserByUserId(Long userId)
    {
        return yDocSysUserMapper.selectyDocSysUserByUserId(userId);
    }

    /**
     * 查询所有医生列表
     * 
     * @param yDocSysUser 所有医生
     * @return 所有医生
     */
    @Override
    public List<yDocSysUser> selectyDocSysUserList(yDocSysUser yDocSysUser)
    {
        return yDocSysUserMapper.selectyDocSysUserList(yDocSysUser);
    }

    /**
     * 新增所有医生
     * 
     * @param yDocSysUser 所有医生
     * @return 结果
     */
    @Override
    public int insertyDocSysUser(yDocSysUser yDocSysUser)
    {
        yDocSysUser.setCreateTime(DateUtils.getNowDate());
        return yDocSysUserMapper.insertyDocSysUser(yDocSysUser);
    }

    /**
     * 修改所有医生
     * 
     * @param yDocSysUser 所有医生
     * @return 结果
     */
    @Override
    public int updateyDocSysUser(yDocSysUser yDocSysUser)
    {
        yDocSysUser.setUpdateTime(DateUtils.getNowDate());
        return yDocSysUserMapper.updateyDocSysUser(yDocSysUser);
    }

    /**
     * 批量删除所有医生
     * 
     * @param userIds 需要删除的所有医生主键
     * @return 结果
     */
    @Override
    public int deleteyDocSysUserByUserIds(Long[] userIds)
    {
        return yDocSysUserMapper.deleteyDocSysUserByUserIds(userIds);
    }

    /**
     * 删除所有医生信息
     * 
     * @param userId 所有医生主键
     * @return 结果
     */
    @Override
    public int deleteyDocSysUserByUserId(Long userId)
    {
        return yDocSysUserMapper.deleteyDocSysUserByUserId(userId);
    }
}
